home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000137_icon-group-sender _Fri Jul 17 16:50:18 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  6KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id QAA11906
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Fri, 17 Jul 1998 16:50:14 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA18627; Fri, 17 Jul 1998 16:49:58 -0700
  7. From: pygmy@eskimo.com (Frank Sergeant)
  8. To: icon-group@baskerville.CS.Arizona.EDU
  9. Subject: Re: using Icon for database application
  10. Date: Fri, 17 Jul 1998 14:25:32 -0500
  11. Reply-To: frank.sergeant@pobox.com
  12. Message-Id: <sU6r1Yv1u83e084yn@eskimo.com>
  13. In-Reply-To: <hkbk1Yv1uAmb084yn@eskimo.com>
  14. Lines: 120
  15. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  16. Status: RO
  17. Content-Length: 4593
  18.  
  19. My fooling around with Icon continues as I try to decide on
  20. the future direction of the database application (currently
  21. in Clipper) that I discussed earlier.  Here is an update
  22. along with some additional questions.
  23.  
  24. I have had the _Graphics Programming in Icon_ book for
  25. awhile and am enjoying it.
  26.  
  27. I suppose I still do not fully appreciate some of the
  28. special/unique features of Icon.  I guess that will come
  29. with time.  Meanwhile, it looks like all the data processing
  30. can be done comfortably in Icon by using its simple features
  31. that I already understand.  One appeal to me of Icon was that
  32. much of what I do in Clipper seems to map conveniently to
  33. Icon.  For example, the arrays/lists in both are 1-based and
  34. can hold elements of mixed types, missing parameters default
  35. to Nil/&null, etc.
  36.  
  37. That leaves two areas of concern: the GUI (under Windows) and
  38. TCP/IP socket connections (to communicate between the workstations
  39. and the server, both running Icon).
  40.  
  41. GUI:
  42.  
  43. I tried the TextDialog() function and at first thought
  44. it might be a show stopper.  The appearance looked a little
  45. too Unixy and not enough like native Windows.  By trying
  46. various color combinations and font sizes, however, I got
  47. something that I might be able to live with.  I put up a
  48. simple example with 4 text entry fields and two buttons.
  49. Unfortunately, the tab key only moves among the 4 text
  50. fields and never gets to the buttons.  Is there a way
  51. to add the buttons to the tab list?  Also, the editing
  52. in the text fields was not at all what a Windows user
  53. would expect (home, end, high-lighted replacement, etc
  54. did not seem to work at all).
  55.  
  56. I need to try it some more, but the first example
  57. I tried with VIB with 3 entry fields and a few buttons
  58. just didn't work right at all.  I could click in one
  59. field with the mouse and see the I-bar cursor appear
  60. but when I started typing, the text appeared in a
  61. different entry field.  Again, the editing didn't work
  62. and so forth.
  63.  
  64. Anyway, for my database project, I might not want
  65. to build the screens with VIB.  I think I would prefer
  66. to build them procedurally.  The main reason is that
  67. the Clipper code is filled with "@ SAY GET" statements
  68. such as
  69.  
  70.      @ 10, 20 SAY "First Name" GET FNAME PICTURE "@!"
  71.  
  72. and I might rather mechanically convert all of them
  73. to put up a "reasonable" entry form (and later make
  74. it prettier).  So, I might not need VIB after all.
  75. If you think I'm overlooking some strong points of
  76. VIB, please enlighten me.
  77.  
  78. Then I stumbled upon a mention of some native
  79. Windows features in Technical Report CS-97-9 "Version
  80. 9 of Icon for Microsoft Windows" on the UTSA site.
  81. I experimented a little with WinMenuBar(), WinScrollBar(),
  82. and WinButton() which all seem to work perfectly and give
  83. the conventional Windows sculpted appearance.
  84.  
  85. I even understood how to attach events to the
  86. menu items and buttons.
  87.  
  88. I tried WinEditRegion() but didn't fully understand
  89. how to work with it.  The editing part did seem to work
  90. properly with home, end, high-lighted replacement, etc.
  91. However, I didn't see how to get out of it or how to make
  92. it into a single line edit field (or even a fixed multi
  93. line edit field), that is, I couldn't get rid of the
  94. scroll bars and couldn't "escape" from the edit region
  95. or see exactly how to tie it into the rest of the program.
  96. I haven't tried looking for the source for this.  It might
  97. explain everything.
  98.  
  99. Are there other native Windows widgets?  Especially,
  100. a single line edit field?
  101.  
  102. Anyway, I am now so close to seeing how I would do
  103. everything GUI-related that my application would need,
  104. that I feel sure the remaining pieces can either be found
  105. or worked around.
  106.  
  107.  
  108. SOCKETS:
  109.  
  110. I gathered from some other postings that the Unix
  111. version has a socket interface and also a general mechanism
  112. for calling arbitrary external (e.g. C) routines but that
  113. the Windows version does not.  (?)
  114.  
  115. I tried looking briefly at the Icon source to see
  116. whether I might see how to add the socket routines and such.
  117. I decided now is not the time for me to try to do this.
  118. It reminded me of the joke I saw posted to comp.lang.python
  119. that went something like this:
  120.  
  121.      You have a problem.  You say to yourself, "I know!
  122.      I'll use Regular Expressions."  Now you have two
  123.      problems.
  124.  
  125. Have I overlooked a way already built into Windows Icon
  126. to call an external routine?  If so, that might solve the
  127. socket question.  If not, I probably can wait on that and
  128. perhaps used a shared directory and let the processes
  129. communicate via files for the present.
  130.  
  131.  
  132. All comments and suggestions and criticisms welcomed.
  133.  
  134.  
  135.   -- Frank
  136.   frank.sergeant@pobox.com
  137.  
  138.  
  139.